Package-level declarations

Types

Link copied to clipboard

The desired orientation for the list of choices.

Link copied to clipboard

See http://hl7.org/fhir/constraint-severity

Link copied to clipboard
Link copied to clipboard

Item control types supported by the SDC library with extensionCode from the value set http://hl7.org/fhir/R4/valueset-questionnaire-item-control.html and viewHolderType as the QuestionnaireViewHolderType to be used to render the question.

Link copied to clipboard

Currently supported mime types.

Properties

Link copied to clipboard

Pre-order list of all questionnaire response items in the questionnaire.

Link copied to clipboard

Desired orientation to render a list of choices.

Link copied to clipboard

The date entry format for the questionnaire item component if one is specified, otherwise, the system default date entry format.

Link copied to clipboard

Pre-order list of descendants of the questionnaire response item (inclusive of the current item).

Link copied to clipboard

The entry format specified in the extension https://hl7.org/fhir/R4/extension-entryformat.html.

Link copied to clipboard
Link copied to clipboard

Whether any one of the nested display item has DisplayItemControlType.HELP control.

Link copied to clipboard

The initial-expression extension on QuestionnaireItemComponent to allow dynamic selection of default or initially selected answers

Link copied to clipboard
Link copied to clipboard

The ItemControlTypes of the questionnaire item if it is specified by the item control extension, or null.

Link copied to clipboard
Link copied to clipboard

A nested questionnaire item of type display with displayCategory extension with EXTENSION_DISPLAY_CATEGORY_INSTRUCTIONS code is used as the instructions of the parent question.

Link copied to clipboard

A nested questionnaire item of type display with displayCategory extension with EXTENSION_DISPLAY_CATEGORY_INSTRUCTIONS code is used as the instructions of the parent question.

Link copied to clipboard

Localized and spanned value of Questionnaire.QuestionnaireItemComponent.prefix if translation is present. Default value otherwise.

Link copied to clipboard

Localized and spanned value of Questionnaire.QuestionnaireItemComponent.text if translation is present. Default value otherwise.

Link copied to clipboard
Link copied to clipboard

Identifies the kinds of attachment allowed to be sent for an element.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the string representation of a PrimitiveType.

Link copied to clipboard

Returns what to display on the UI depending on the Type. Used to get the display representation for response item answer options such as QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent or Questionnaire.QuestionnaireItemAnswerOptionComponent.

Link copied to clipboard
Link copied to clipboard

Flatten a nested list of Questionnaire.QuestionnaireItemComponent recursively and returns a flat list of all items into list embedded at any level

Link copied to clipboard

Returns VISIBLE if any of the view is visible, GONE otherwise.

Link copied to clipboard

Returns a Spanned object that contains the localized instructions for all of the items in this list that are of type Questionnaire.QuestionnaireItemType.DISPLAY and have the isInstructionsCode flag set. The instructions are separated by newlines.

Link copied to clipboard
fun getRequiredOrOptionalText(questionnaireViewItem: QuestionnaireViewItem, context: Context): String?

Returns R.string.required if QuestionnaireViewItem.showRequiredText and Questionnaire.QuestionnaireItemComponent.required is true, or R.string.optional_text if QuestionnaireViewItem.showOptionalText is true.

Link copied to clipboard
fun getValidationErrorMessage(context: Context, questionnaireViewItem: QuestionnaireViewItem, validationResult: ValidationResult): String?

Returns the validation error message. If Questionnaire.QuestionnaireItemComponent.required is true, the error message starts with Required text and the rest of the error message is placed on the next line.

Link copied to clipboard

Returns value as string depending on the Type of element.

Link copied to clipboard

Returns true if at least one mime type matches the given type.

Link copied to clipboard

Returns true if all mime types match the given type.

Link copied to clipboard

Returns the unique identifier of a Type. Used to differentiate between item answer options that may have similar display strings

Link copied to clipboard
fun ViewGroup.include(@LayoutRes layoutRes: Int)

Inflates layoutRes and attaches it to this.

Link copied to clipboard
fun ViewGroup.inflate(@LayoutRes layoutRes: Int): View

Inflates layoutRes and returns it without attaching it to this.

Link copied to clipboard
fun initHelpViews(helpButton: Button, helpCardView: MaterialCardView, helpTextView: TextView, questionnaireItem: Questionnaire.QuestionnaireItemComponent, questionnaireResponseItem: QuestionnaireResponse.QuestionnaireResponseItemComponent, isHelpCardInitiallyVisible: Boolean, helpCardStateChangedCallback: (Boolean, QuestionnaireResponse.QuestionnaireResponseItemComponent) -> Unit)

Initializes the text for helpTextView with instructions on how to use the feature, and sets the visibility and click listener for the helpButton to allow users to access the help information and toggles the visibility for view helpCardView.

Link copied to clipboard

Returns the AppCompatActivity if there exists one wrapped inside ContextThemeWrapper s, or null otherwise.

Link copied to clipboard
fun TextView.updateTextAndVisibility(localizedText: Spanned? = null)

Displays localizedText if it is not null or empty, or hides the TextView.